package main

import "fmt"

func Copy(name string) string {
	fmt.Println("in func copy:", &name)
	return name
}

func Set(name *string, value string) {
	fmt.Println("in func set:", name)
	*name = value
}

func main() {
	name := "枫枫"
	cpy := Copy(name)
	Set(&name, "枫枫知道")
	name2 := name
	fmt.Printf("name addr:%p,name:%#v;cpy addr:%p,cpy:%#v\n", &name, name, &cpy, cpy)
	fmt.Printf("name2 addr:%p,name2:%#v", &name2, name2)
}
